/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufscar.compiladores.ast;

/**
 *
 * @author takeshi
 */
public class ParenthesisExpr extends Expr {
    
    private Expr expr;
    
    public ParenthesisExpr(Expr expr) {
        this.expr = expr;
    }

    public void genC(PW pw, boolean putParenthesis) {
        pw.out.print("(");
        expr.genC(pw, false);
        pw.print(")");
    }

    public Type getType() {
        return expr.getType();
    }
}